package cn.echase.ecare.yinfayun.utils;

import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjUtil;

import java.util.Date;

/**
 * @Title: DateV3Util
 * @Author lidisong
 * @Package cn.echase.ecare.yinfayun.utils
 * @Date 08/05/2025 星期四 10:26 上午
 * @description:
 */
public class DateV3Util {

    public static Date transDateToDate(Date date, String format) {
        if (ObjUtil.isNull(date)) {
            return null;
        }

        return DateUtil.parse(DateUtil.format(date, format));
    }

    public static String format(Date date, String format) {
        if (ObjUtil.isNull(date)) {
            return null;
        }
        return DateUtil.format(date, format);
    }

}
